﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Class1
    {
        struct PersonStruct
        {
            public string name;
            public int telephone;
            public string address;
        
        public void PersonStructs(string name, int phone, string address)
        {
            this.name = name;
            this.telephone=telephone;
            this.address = address;
        }
        public void output()
        {
            Console.WriteLine("我的名字叫{0}，电话是{1}，地址是{2}", this.name, this.telephone, this.address);
        }
        public void output(string name)
        {
            Console.WriteLine("我的名字叫{0}，电话是{1}，地址是{2}", this.name, this.telephone, this.address);
        }
    }
        static void Main(string[] args)
        {
            PersonStruct p1;
            p1.name = "玄策";
            p1.telephone = 1546135464;
            p1.address = "福建";
            p1.output();

            PersonStruct p2 = p1;
            p2.name = "李白";
            p1.output();
            string str = "刘备";
            p1.output(str);

            PersonClass1 p3 = new PersonClass1();
            p3.name = "韩信";
            p3.phone = "1564564879";
            p3.address = "江西";
            p3.output();

            PersonClass1 p4 = p3;
            p4.name = "赵云";
            p4.output();
        }
    }
}
